module Piston
  module PluginManager
    class PluginDataList < System::Collections::Generic::List[PluginData]
      attr_accessor :selected_plugin_data
      def initialize
        workspace = Piston::Workspace.instance
        workspace.plugins.each_with_index do |plugin_data, index|
          data = {'id' => index + 1}.update(plugin_data)
          self.add PluginData.new(data)
        end
      end
    end
  end
end